package com.heima.kafka.listener;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @author shkstart
 * @create 2023-01-06-22:06
 */
@Component
public class ConsumerListener {

    @KafkaListener(topics = "testTopic")
    public void msg(ConsumerRecord<String,String> consumerRecord){
        System.out.println(consumerRecord.key() + "====" + consumerRecord.value());
    }
}
